package com.education.common.utils;

import lombok.Data;

import java.io.Serializable;

@Data
public class ApiReturnObject implements Serializable {

    private static final long serialVersionUID = 1L;

    String code = "200";
    Object message;
    Object returnObject;



    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public Object getReturnObject() {
        return returnObject;
    }

    public void setReturnObject(Object returnObject) {
        this.returnObject = returnObject;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    Integer size;

    public ApiReturnObject() {
    }

    public ApiReturnObject(String code, Object message, Object returnObject) {
        super();
        this.code = code;
        this.message = message;
        if(null==returnObject){
            returnObject="";
        }else {
            this.returnObject = returnObject;
        }
    }

    public ApiReturnObject(String code, Object message, Integer size, Object returnObject) {
        super();
        this.code = code;
        this.message = message;
        this.size = size;
        if(null==returnObject){
            returnObject="";
        }else {
            this.returnObject = returnObject;
        }
    }

    public ApiReturnObject(Object message, Object returnObject) {
        super();
        this.message = message;
        if(null==returnObject){
            returnObject="";
        }else {
            this.returnObject = returnObject;
        }
    }

    public ApiReturnObject(Object returnObject) {
        super();
        if(null==returnObject){
            returnObject="";
        }else {
            this.returnObject = returnObject;
        }
    }
}